1110A - Parity - CodeForces Solution


math *900

Please click on ads to support us..

Python Code:

from collections import deque
from math import *
import sys
import random
from bisect import *
from functools import reduce


b,k = map(int,input().split())
arr = list(map(int,input().split()))
if b%2==0:
    print("even" if arr[-1]%2==0 else "odd")
else:
    even=odd=0
    for i in arr:
        if i%2==0:
            even+=1
        else:
            odd+=1
    if odd%2==1:
        print("odd")
    else:
        print("even")




Comments

Submit
0 Comments
More Questions

1005B - Delete from the Left
94A - Restoring Password
1529B - Sifid and Strange Subsequences
1455C - Ping-pong
1644C - Increase Subarray Sums
1433A - Boring Apartments
1428B - Belted Rooms
519B - A and B and Compilation Errors
1152B - Neko Performs Cat Furrier Transform
1411A - In-game Chat
119A - Epic Game
703A - Mishka and Game
1504C - Balance the Bits
988A - Diverse Team
1312B - Bogosort
1616B - Mirror in the String
1660C - Get an Even String
489B - BerSU Ball
977C - Less or Equal
1505C - Fibonacci Words
1660A - Vasya and Coins
1660E - Matrix and Shifts
1293B - JOE is on TV
1584A - Mathematical Addition
1660B - Vlad and Candies
1472C - Long Jumps
1293D - Aroma's Search
918A - Eleven
1237A - Balanced Rating Changes
1616A - Integer Diversity